
export default {
    install(Vue) {
        "use strict";
        Vue.config.globalProperties.$openUrl = function (url, type) {
            let typeTemp="_blank";
            if (type) {
                typeTemp=type;
            }
            if (url) {
                let link=document.createElement("a");
                link.style.display="none";
                link.target=typeTemp;
                link.href=url;
                document.body.appendChild(link);
                link.click();
                document.body.removeChild(link);
            }
        }
    }
};

export function setDomStyle(id) {
    "use strict";

    const Dom = document.createElement("div");
    Dom.id = id;
    Dom.style.width = "100%";
    Dom.style.height = "100%";
    Dom.style.position = "absolute";
    Dom.style.top = "0";
    Dom.style.zIndex = "-1";
    Dom.style.opacity = "0";
    Dom.style.pointerEvents = "none";
    return Dom;
}
